<?php

function smarty_function_notification($params, $template) {
    $title = "";
    $message = "";
    $type = "info";

    if (array_key_exists("title", $params)) {
        $title = $params["title"];
    }
    if (array_key_exists("message", $params)) {
        $message = $params["message"];
    }
    if (array_key_exists("type", $params)) {
        $type = $params["type"];
    }

    return "
        <div class='notification $type'>
            <span></span>
            <div class='text'>
                <p>
                    <strong>$title</strong>
                    $message
                </p>
            </div>
        </div>
        ";
}

?>
